<!DOCTYPE html>
<html>
  <head>
    <title>Opus.js / WebAudio Test</title>
    <meta charset="UTF-8" />
	<script src="test.js" type="text/javascript"></script>
    <style type="text/css">
      *  {font-size:100%; font-family:sans-serif}
      fieldset { display: inline; padding: 1ex; margin-bottom: 1ex; vertical-align: top }
    </style>
  </head>
  <body>
    <h1 style="font-size: 110%">Opus.js Encoder / Decoder Sample</h1>
    <fieldset>
      <legend>Input</legend>
      <div>
        <input type="radio" id="input_mic" name="input_type"><label for="input_mic">Microphone</label>
      </div>
      <div>
        <input type="radio" id="input_file" name="input_type"><label for="input_file">File</label>
        <input type="file" id="input_filedata" style="display:block;margin-left:1.5em;font-size:80%;margin-top:0.5ex">
      </div>
    </fieldset>
    <fieldset>
      <legend>Opus Config</legend>
      <div>
        <label for="opus_sampling_rate">Sampling Rate:</label>
        <select id="opus_sampling_rate">
          <option value="8">8 kHz</option>
          <option value="12">12 kHz</option>
          <option value="16">16 kHz</option>
          <option value="24">24 kHz</option>
          <option value="48" selected="selected">48 kHz</option>
        </select>
      </div>
      <div>
        <label for="opus_frame_duration">Frame Duration:</label>
        <select id="opus_frame_duration">
          <option value="2.5">2.5 ms</option>
          <option value="5">5 ms</option>
          <option value="10">10 ms</option>
          <option value="20" selected="selected">20 ms</option>
          <option value="40">40 ms</option>
          <option value="60">60 ms</option>
        </select>
      </div>
      <div>
        <label for="opus_app">Application:</label>
        <select id="opus_app">
          <option value="2048">VoIP</option>
          <option value="2049" selected="selected">Audio</option>
          <option value="2051">Restricted Low Delay</option>
        </select>
      </div>
    </fieldset>
    <fieldset>
      <legend>Commands</legend>
      <div>
        <button id="play">Play</button>
        <button id="encdecplay">Encode &amp; Decode &amp; Play</button>
      </div>
    </fieldset>
  </body>
</html>
